# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

pkgname=pcmanfm
pkgver=1.3.1
pkgrel=1
pkgdesc="Extremely fast and lightweight file manager"
arch="all"
url="https://wiki.lxde.org/en/PCManFM"
license="GPL-2.0-or-later"
makedepends="gtk+3.0-dev libfm-dev intltool"
subpackages="$pkgname-doc $pkgname-lang"
source="
	https://downloads.sourceforge.net/pcmanfm/$pkgname-$pkgver.tar.xz
	"

# secfixes:
#   1.2.5-r1:
#     - CVE-2017-8934

build() {
	cd "$builddir"

	./configure \
		--sysconfdir=/etc \
		--prefix=/usr \
		--with-gtk=3
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	sed -i 's|x-directory/normal|inode/directory|' \
		"$pkgdir"/usr/share/applications/pcmanfm.desktop
}

sha512sums="68fbc55b3ffd9da17c861d2cc41590a455ec2c0eb590ba4862f8a0ae01caac34a58645d847d318553ff588df20d355bbcbf1138a792cb45922eb04b047f681c4  pcmanfm-1.3.1.tar.xz"
